package com.asamioffice.goldenport.util

import scala.collection.immutable
import scala.collection.mutable.ArrayBuffer
import scala.util.matching.Regex

/**
 * @since   Sep. 24, 2010
 * @version Oct. 12, 2010
 * @version Dec.  3, 2011
 * @author  ASAMI, Tomoharu
 */
object OptionUtil {
  @deprecated("Use Option(x)")
  def lift[A](o: A): Option[A] = {
    if (o == null) None
    else Some(o)
  }

  @deprecated("Use PartifalFunction#lift(x)")
  def collect[A, B](o: A)(pf: PartialFunction[A, B]): Option[B] = {
    pf.lift(o)
  }
}
